#include <boost/random.hpp>
#include <boost/random/random_device.hpp>
#include <iostream>
#include <ctime>
#include <cstdint>
using namespace std;

void func1() {
    boost::random::mt19937 gen(time(0));
    boost::random::uniform_01<> dist;
    
    for (int i = 0; i < 10; ++i)
    {
        float a = dist(gen);
        cout << a << endl;
    }
}

void func2() {
    boost::random::mt19937 gen(time(0));
    boost::random::uniform_smallint<> dist(1, 100);
    //测试产生随机数
    for (int i = 0; i < 10; ++i)
    {
        int a = dist(gen);
        cout << a << endl;
    }
}
void func3() {
    boost::random::mt19937 gen(time(0));
    boost::random::bernoulli_distribution<> dist;
    for (int i = 0; i < 10; ++i)
    {
        int a = dist(gen);
        std::cout << a << std::endl;
    }
}

void func4() {
    std::cout << boost::random::random_device::min() << ":" << boost::random::random_device::max() << std::endl;
    boost::random::random_device gen;
    for (int i = 0; i < 20; ++i)
    {
        std::cout << gen() << std::endl;
    }
}

int main()
{
  func4();

  return 0;
}